package spring.DI;

import com.me.common.util.SleepUtil;
import javax.annotation.PostConstruct;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Repository;

/**
 * 
 *
 * @author ME
 * @date   2019/9/26
 */
@Profile("qqq")
@Repository
public class IndexDaoImpl2 implements IndexDao {

    public IndexDaoImpl2() {
        System.out.println("IndexDaoImpl2 Constructor: sleep 3s");
        // SleepUtil.seconds(3);
    }

    @Override
    public void test() {
        System.out.println("dao2.test()");
    }

    @PostConstruct
    public void postConstruct() {
        System.out.println("IndexDaoImpl2 PostConstruct");
        // while (true) {
        //     SleepUtil.seconds(3);
        //     System.out.println("2333");
        // }
    }
}
